package dao

import "sdc/repository/db/model"

// 迁移数据库表结构
func migrate() error {
	return _db.Set("gorm:table_options", "charset=utf8mb4").
		AutoMigrate(
			&model.User{},
			&model.Project{},
			&model.Category{},
			&model.Donation{},
			&model.UserProjectRelation{},
			&model.Favorite{},
			&model.Role{},
			&model.Permission{},
			&model.UserRole{},
			&model.RolePermission{},
		)
}
